package com.woniu.day8.util;

public class FinalConst {
    public static final int SUCCESS = 200; // 成功
    public static final int BAD_REQUEST = 400; // 错误请求
    public static final int UNAUTHORIZED = 401; // 未授权
    public static final int FORBIDDEN = 403; // 禁止访问
    public static final int NOT_FOUND = 404; // 资源未找到
    public static final int INTERNAL_SERVER_ERROR = 500; // 内部服务器错误

    public static String getStatusMessage(int statusCode) {
        switch (statusCode) {
            case SUCCESS: return "Success";
            case BAD_REQUEST: return "Bad Request";
            case UNAUTHORIZED: return "Unauthorized";
            case FORBIDDEN: return "Forbidden";
            case NOT_FOUND: return "Not Found";
            case INTERNAL_SERVER_ERROR: return "Internal Server Error";
            default: return "Unknown Status";
        }
    }
}
